/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.xmlepf.xml.adapter;

import java.util.List;
import org.xmlepf.utils.ObjectCreator;

/**
 *
 *
 */
public class SimpleXPath {
    
   public static List<XMLNode> query(String xml, String xPathQuery) throws Exception {
       XPath xPath = (XPath) ObjectCreator.get("XPath");
       xPath.initialize(xml);
       return xPath.query(xPathQuery);
   }

   public static List<XMLNode> query(XMLNode node, String xPathQuery) throws Exception {
       XPath xPath = (XPath) ObjectCreator.get("XPath");
       xPath.initialize(node);
       return xPath.query(xPathQuery);
   }
}
